package com.flute.haflute.client;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

import com.flute.haflute.jobbox.base.ClientJobListener;

/**
 * 发起作业请求的客户端对任务进行监控的入口。<br>
 * 
 * 典型使用：客户端发起请求后，如果需要跟踪作业的执行，则使用继承该类的对象注册到作业工作节点上。
 * 
 */
public class ClientJobProcess extends UnicastRemoteObject implements
		ClientJobListener {
	/** serialVersionUID */
	private static final long serialVersionUID = 9062182357094615638L;

	private boolean jobFinished = false;

	protected ClientJobProcess() throws RemoteException {
		super();
	}

	@Override
	public void jobFailed() throws Exception {

	}

	@Override
	public void jobFinished() throws Exception {
		jobFinished = true;
	}

	@Override
	public void jobPaused() throws Exception {

	}

	@Override
	public void jobStarted() throws Exception {

	}

	public boolean isJobFinished() {
		return jobFinished;
	}

}
